<!DOCTYPE html>
<head>
    <meta charset='utf-8'/>
    <title>wwww.layabox.com</title>
    <meta name='apple-mobile-web-app-capable' content='yes' />
    <meta name='full-screen' content='true' />
    <meta name='screen-orientation' content='portrait' />
    <meta name='x5-fullscreen' content='true' />
    <meta name='360-fullscreen' content='true' />
    <meta http-equiv='expires' content='0' />
    <meta name='laya' logoimg='logo.png' logobkcolor='#ffffff' screenorientation='landscape' cacheid='fffffffff' />
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>
<body style="background-color: #FFFFFF;" onload="init()">
    <!-- protocol buffer -->
    <script type="text/javascript" src="../../../bin/js/libs/bytebuffer.js"></script>
    <script type="text/javascript" src="../../../bin/js/libs/protobuf.js"></script>
    <!-- matter.js -->
    <script src="../../../bin/js/libs/matter.js"></script>
    <script src="../../../bin/js/libs/LayaRender.js"></script>
    <!-- libraries -->
    <script src="../../../bin/js/libs/laya.core.js"></script>
    <script src="../../../bin/js/libs/laya.webgl.js"></script>
    <script src="../../../bin/js/libs/laya.filter.js"></script>
    <script src="../../../bin/js/libs/laya.particle.js"></script>
    <script src="../../../bin/js/libs/laya.ani.js"></script>
    <script src="../../../bin/js/libs/laya.ui.js"></script>
    <script src="../../../bin/js/libs/laya.html.js"></script>
    <script src="../../../bin/js/libs/laya.tiledmap.js"></script>
    <script src="../../../bin/js/libs/laya.device.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=LIhOlvWfdiPYMCsK5wsqlFQD8wW4Bfy6"></script>
    <!-- demos -->
    <script id="jsCtrl"></script>
    <div style="position: absolute; left: 150px; top: 0px; z-index: 999999">
        <span style="color:#ff0000">左右箭头键切换</span>
        <select id="select" onChange="selectChanged()">
            <option>Animation_Altas</option>
            <option>Animation_SWF</option>
            <option>BlendMode_Lighter</option>
            <option>Debug_FPSStats</option>
            <option>Filters_Blur</option>
            <option>Filters_Color</option>
            <option>Filters_Glow</option>
            <option>HitTest_Point</option>
            <option>HitTest_Rectangular</option>
            <option>InputDevice_Compass</option>
            <option>InputDevice_GluttonousSnake</option>
            <option>InputDevice_Map</option>
            <option>InputDevice_Media</option>
            <option>InputDevice_Shake</option>
            <option>InputDevice_Video</option>>
            <option>Interaction_CustomEvent</option>
            <option>Interaction_Drag</option>
            <option>Interaction_FixInteractiveRegion</option>
            <option>Interaction_Hold</option>
            <option>Interaction_Keyboard</option>
            <option>Interaction_Mouse</option>
            <option>Interaction_Rotate</option>
            <option>Interaction_Scale</option>
            <option>Interaction_Swipe</option>
            <option>Loader_MultipleType</option>
            <option>Loader_ProgressAndErrorHandle</option>
            <option>Loader_Sequence</option>
            <option>Loader_SingleType</option>
            <option>Network_GET</option>
            <option>Network_POST</option>
            <option>Network_ProtocolBuffer</option>
            <option>Network_Socket</option>
            <option>Network_XML</option>
            <option>Particle_T1</option>
            <option>Particle_T2</option>
            <option>Particle_T3</option>
            <option>PerformanceTest_Cartoon2</option>
            <option>PerformanceTest_Cartoon</option>
            <option>PerformanceTest_Legend</option>
            <option>PerformanceTest_Maggots</option>
            <option>PerformanceTest_Skeleton</option>
            <option>Physics_Cloth</option>
            <option>Physics_NewtonsCradle</option>
            <option>Physics_Slingshot</option>
            <option>PIXI_Example_04</option>
            <option>PIXI_Example_05</option>
            <option>PIXI_Example_21</option>
            <option>PIXI_Example_23</option>
            <option>Skeleton_ChangeSkin</option>
            <option>Skeleton_MultiTexture</option>
            <option>Skeleton_SpineEvent</option>
            <option>Skeleton_SpineIkMesh</option>
            <option>Skeleton_SpineStretchyman</option>
            <option>Skeleton_SpineVine</option>
            <option>SmartScale_Align_Contral</option>
            <option>SmartScale_Landscape</option>
            <option>SmartScale_Portrait</option>
            <option>SmartScale_Scale_EXTRACT_FIT</option>
            <option>SmartScale_Scale_NOBORDER</option>
            <option>SmartScale_Scale_NOSCALE</option>
            <option>SmartScale_Scale_SHOW_ALL</option>
            <option>SmartScale_T</option>
            <option>Sound_SimpleDemo</option>
            <option>Sprite_Cache</option>
            <option>Sprite_Container</option>
            <option>Sprite_DisplayImage</option>
            <option>Sprite_DrawPath</option>
            <option>Sprite_DrawShapes</option>
            <option>Sprite_Guide</option>
            <option>Sprite_MagnifyingGlass</option>
            <option>Sprite_NodeControl</option>
            <option>Sprite_Pivot</option>
            <option>Sprite_RoateAndScale</option>
            <option>Sprite_SwitchTexture</option>
            <option>Text_AutoSize</option>
            <option>Text_BitmapFont</option>
            <option>Text_ComplexStyle</option>
            <option>Text_Editable</option>
            <option>Text_HTML</option>
            <option>Text_InputMultiline</option>
            <option>Text_InputSingleline</option>
            <option>Text_MaxChars</option>
            <option>Text_Overflow</option>
            <option>Text_Prompt</option>
            <option>Text_Restrict</option>
            <option>Text_Scroll</option>
            <option>Text_Underline</option>
            <option>Text_WordWrap</option>
            <option>TiledMap_AnimationTile</option>
            <option>TiledMap_IsometricWorld</option>
            <option>TiledMap_PerspectiveWall</option>
            <option>TiledMap_ScrollMap</option>
            <option>Timer_CallLater</option>
            <option>Timer_DelayExcute</option>
            <option>Timer_Interval</option>
            <option>Tween_EaseFunctionsDemo</option>
            <option>Tween_Letters</option>
            <option>Tween_SimpleSample</option>
            <option>Tween_TimeLine</option>
            <option>UI_Button</option>
            <option>UI_CheckBox</option>
            <option>UI_Clip</option>
            <option>UI_ColorPicker</option>
            <option>UI_ComboBox</option>
            <option>UI_Dialog</option>
            <option>UI_Image</option>
            <option>UI_Input</option>
            <option>UI_Label</option>
            <option>UI_List</option>
            <option>UI_ProgressBar</option>
            <option>UI_RadioGroup</option>
            <option>UI_ScrollBar</option>
            <option>UI_Slider</option>
            <option>UI_Tab</option>
            <option>UI_TextArea</option>
            <option>UI_Tree</option>
            <option>UI_Panel</option>
        </select>
		<input type="button" value="切换" onclick="showNext()" />
    </div>
    <script>
    var jsCtrl,select,type;
    function init(){
    jsCtrl = document.getElementById("jsCtrl");
    select = document.getElementById("select");
    type = GetQueryString("type");
    type = type || "Animation_SWF";
    select.value = type;
    jsCtrl.src="samples/"+type+".js";
    document.onkeyup = function(e){
    var keycode = e.which;
    if(keycode==37){
    if(select.selectedIndex>0)
    select.selectedIndex--;
    else
    select.selectedIndex = select.options.length-1;
    }else if(keycode == 39){
    if(select.selectedIndex<select.options.length-1)
        select.selectedIndex++;
        else
        select.selectedIndex = 0;
        }
        selectChanged();
        }
        }
        function selectChanged(){
        if(type !=select.value){
        window.location.href = window.location.pathname+"?type="+select.value;
        }
        }
        function GetQueryString(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r!=null)return  unescape(r[2]); return null;
        }
		function showNext(){
			select.selectedIndex++;
			selectChanged();
		}
        </script>
    </body>
</html>